﻿<!--
// (c) Norbert Huffschmid
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
-->

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    
    <Style x:Key="ShoutBoxButton" TargetType="ToggleButton">
        <Setter Property="Padding" Value="1"/>
        <Setter Property="MinWidth" Value="10" />
        <Setter Property="MinHeight" Value="10" />
        <Setter Property="Background" Value="DarkSlateGray" />
        <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <Grid Background="Transparent">
                        <Ellipse Name="border">
                            <Ellipse.Fill>
                                <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
                                    <GradientStop Color="black" Offset="0" />
                                    <GradientStop Color="Silver" Offset="0.5" />
                                    <GradientStop Color="black" Offset="1" />
                                </LinearGradientBrush>
                            </Ellipse.Fill>
                        </Ellipse>
                        <Grid RenderTransformOrigin="0.5,0.5">
                            <Grid.RenderTransform>
                                <ScaleTransform ScaleX="0.8" ScaleY="0.8"/>
                            </Grid.RenderTransform>
                            <Grid Name="pressArea"
                                      RenderTransformOrigin="0.5,0.5">
                                <Ellipse>
                                    <Ellipse.Fill>
                                        <RadialGradientBrush GradientOrigin="0.35,0.35" 
                                                                 Center="0.5,0.5"
                                                                 RadiusX="0.75" RadiusY="0.75">
                                            <RadialGradientBrush.GradientStops>
                                                <GradientStop Color="White" Offset="0" />
                                                <GradientStop Color="Gray" Offset="1" />
                                            </RadialGradientBrush.GradientStops>
                                        </RadialGradientBrush>
                                    </Ellipse.Fill>
                                </Ellipse>
                                <Ellipse Name="redButton" Visibility="Hidden">
                                    <Ellipse.Fill>
                                        <RadialGradientBrush GradientOrigin="0.35,0.35" 
                                                                 Center="0.5,0.5"
                                                                 RadiusX="0.75" RadiusY="0.75">
                                            <RadialGradientBrush.GradientStops>
                                                <GradientStop Color="LightPink" Offset="0" />
                                                <GradientStop Color="Red" Offset="1" />
                                            </RadialGradientBrush.GradientStops>
                                        </RadialGradientBrush>
                                    </Ellipse.Fill>
                                </Ellipse>
                                <Viewbox Stretch="Uniform">
                                    <Canvas Width="100" Height="100"
                                                RenderTransformOrigin="0.5,0.5">
                                        <Canvas.RenderTransform>
                                            <ScaleTransform ScaleX="0.7" ScaleY="0.7"/>
                                        </Canvas.RenderTransform>
                                        <Line Stroke="{TemplateBinding Background}" StrokeThickness="5"
                                                  X1="35" Y1="80" X2="65" Y2="80" />
                                        <Line Stroke="{TemplateBinding Background}" StrokeThickness="5"
                                                  X1="50" Y1="80" X2="50" Y2="65" />
                                        <Path Stroke="{TemplateBinding Background}" StrokeThickness="5">
                                            <Path.Data>
                                                <PathGeometry>
                                                    <PathFigure StartPoint="70 45">
                                                        <ArcSegment Point="30 45"
                                                                        Size="20 20"
                                                                        SweepDirection="Clockwise" />
                                                    </PathFigure>
                                                </PathGeometry>
                                            </Path.Data>
                                        </Path>
                                        <Rectangle Fill="{TemplateBinding Background}"
                                                       Canvas.Left="35" Canvas.Top="10"
                                                       Width="30" Height="50"
                                                       RadiusX="15" RadiusY="15"/>

                                    </Canvas>
                                </Viewbox>
                            </Grid>
                        </Grid>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter TargetName="redButton" Property="Visibility">
                                <Setter.Value>Visible</Setter.Value>
                            </Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>